package com.fubang.pathlearning.titlebar;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.fubang.pathlearning.R;

public class TitleBarViewActivity extends AppCompatActivity {

    private TitleBarView mTitleBarView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_title_bar_view);
        mTitleBarView = (TitleBarView) findViewById(R.id.title_bar);
        mTitleBarView.setCallBack(new TitleBarView.CallBack() {
            @Override
            public void onLeftClick(View v) {
                Toast.makeText(TitleBarViewActivity.this, "左侧", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onRightClick(View v) {
                Toast.makeText(TitleBarViewActivity.this, "右侧", Toast.LENGTH_SHORT).show();
            }
        });
    }


}
